﻿using FreeSql.Internal.Model;

namespace LF.Domain.Helper
{
    public class StringDateOnly : TypeHandler<DateOnly>
    {
        public override DateOnly Deserialize(object value)
        {
            return DateOnly.Parse(value.ToString());
        }

        public override object Serialize(DateOnly value)
        {
            return value.ToString("yyyy-MM-dd");
        }
    }
}

